
import './App.css';
import React,{ Component,lazy,Suspense } from 'react';

import { BrowserRouter as Router,Route,Redirect } from 'react-router-dom'
import { Provider } from 'react-redux'

var Abilitysson = lazy(()=> import("./views/Abilitys/Abilitysson") )
var Commercialsson = lazy(()=> import("./views/Commercials/Commercialsson") )
var Enterprisesson = lazy(()=> import("./views/Enterprises/Enterprisesson") )
var Informationsson = lazy(()=> import("./views/Informations/Informationsson") )
var Minesson = lazy(()=> import("./views/Mines/Minesson") )

class App extends Component {
  constructor(props){
    super(props);
    this.state = {
      tabbardata:[]
    }
  }
  
  render() {
    return (
      <div>
        
          <Router>
            <Suspense fallback={ <div>组件加载中...</div> }>
              <Route path="/abilitysson" component={ Abilitysson }></Route>
            </Suspense>
            <Suspense fallback={ <div>组件加载中...</div> }>
              <Route path="/commercialsson" exact component={ Commercialsson }></Route>
            </Suspense>
            <Suspense fallback={ <div>组件加载中...</div> }>
              <Route path="/enterprisesson" exact component={ Enterprisesson }></Route>
            </Suspense>
            <Suspense fallback={ <div>组件加载中...</div> }>
              <Route path="/informationsson" exact component={ Informationsson }></Route>
            </Suspense>
            <Suspense fallback={ <div>组件加载中...</div> }>
              <Route path="/minesson" exact component={ Minesson }></Route>
            </Suspense>

            <Redirect from="/" to="/abilitysson"></Redirect>
          </Router>
          
        
      </div>
    );
  }
}

export default App;
